package com.myjar.excel.serializer;

import org.apache.poi.ss.usermodel.Cell;

public class FloatCodec implements ObjectSerializer<Float> {
    public static final ObjectSerializer instance = new FloatCodec();

    @Override
    public void write(Cell cell, Float aFloat) {
        cell.setCellValue(aFloat);
    }

    @Override
    public Float read(Cell cell) {
        return Float.parseFloat(cell.getNumericCellValue() + "");
    }
}
